home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 13 / CU Amiga Magazine's Super CD-ROM 13 (1997)(EMAP Images)(GB)(Track 1 of 2)[!][issue 1997-08].iso / CUCD / Graphics / Ghostscript / doc / unix-lpr.txt < prev    next >
Text File  |  1997-04-12  |  6KB  |  142 lines

  1.     NOTE: this file was contributed by a user: please contact
  2.     George Cameron <george@bio-medical-physics.aberdeen.ac.uk>
  3.     if you have questions.
  4.       Please contact Yves Arrouye <Yves.Arrouye@imag.fr> if you
  5.     have problem with the number-of-colors part of the script.
  6.  
  7. Help on setting up an lpr filter for Ghostscript
  8. ================================================
  9.  
  10. OVERVIEW:
  11.  
  12.  "How do I set up Ghostscript to provide postscript queues in a standard lpr
  13.  environment on Unix systems" appears as a Frequently Asked Question amongst
  14.  Ghostscript users, and the following utilities are designed to make this
  15.  task a little easier. The files supplied are:
  16.  
  17.  unix-lpr.txt:    this file
  18.  unix-lpr.sh:    a flexible, multi-option print filter shell script
  19.  lprsetup.sh:    a shell script which sets up soft links and creates a
  20.         template insert for the printcap file
  21.  
  22.  
  23. WHAT IT CAN DO:
  24.  
  25.  The print filter resides in the standard Ghostscript installation directory
  26.  (eg. /usr/local/share/ghostscript), together with a dummy filter directory
  27.  containing various soft links which point to the filter. It offers the
  28.  following features:
  29.  
  30.     o  Multiple devices supported by a single filter
  31.     o  Multiple bit-depths for the same device
  32.     o  Multiple number of colors for the same device
  33.     o  Direct (single-queue) and indirect (two-queue) setup
  34.     o  Support for the standard preprocessing filters if you have the
  35.         corresponding (whatever)-to-postscript translators
  36.     o  Redirection of diagnostic and programmed output to a logfile in 
  37.         the spooling directory
  38.     o  Maintaining of printer accounting records of the numbers of pages
  39.         printed by each user (compatible with the 'pac' command)
  40.     o  Straightforward editing for further customisation
  41.  
  42.  
  43. SETTING IT UP:
  44.  
  45.  The lprsetup.sh script needs to have two lines edited before running, to set
  46.  the printer devices to use and the list of filters available. With this
  47.  information, it will:
  48.  
  49.     o  Create a 'filt' subdirectory of the standard Ghostscript
  50.         installation directory
  51.     o  Create the links in this directory which enable the filter to
  52.         determine the parameters for running Ghostscript
  53.     o  Automatically generate printcap entries which should need only
  54.         a little editing before adding to your system printcap file
  55.  
  56.  
  57. EDITING THE DEVICE LIST:
  58.  
  59.  At the top of lprsetup.sh, you will find a line of the form DEVICES=" ... ".
  60.  This should be edited to replace the example list with your own list of 
  61.  devices, with each entry comprising the name of the device, follwed by three
  62.  optional additional fields, separated by dots.
  63.  
  64.  The first field is only required if the printer device understands the
  65.  qualifier -dBitsPerPixel=.., which only applies to colour devices. For
  66.  a particular number <N> of bits per pixel, add the suffix .<N> to the
  67.  device name, eg. cdj500.3 cdj500.24 etc.
  68.  The second field is only required if the printer device understand the
  69.  setting of the Colors device parameter (as in -dColors=...) which only
  70.  applies to colour devices (and at present is only supported by the bjc*
  71.  family of drivers). For a particluar number <C> of colors, add the suffix
  72.  <.C> to te device name, e.g. bjc600.24.3 bjc600.8.1 etc.
  73.  The third field is required if you wish to use two separate queues for the
  74.  device, a 'raw' queue as well as the postscript queue (see discussion below).
  75.  If this is required, you should add the suffix .dq ('dual-queue') to the name,
  76.  whether or not a bits-per-pixel suffix has already been added.
  77.  
  78.  Thus, the following list supports a cdj550 device at 3 different bit-depths
  79.  (24 bpp, 3 bpp and 1 bpp), with a dual-queue (ie. separate queue for the raw
  80.  data); a monochrome deskjet device with a single queue; and a djet500 device
  81.  using a separate queue:
  82.  
  83.  DEVICES="cdj550.24.dq cdj550.3.dq cdj550.1.dq deskjet djet500.dq"
  84.  
  85.  
  86. EDITING THE FILTER LIST:
  87.  
  88.  The standard list contains only the generic 'if' filter, although there
  89.  is a commented-out list showing the other filters which you may have 
  90.  available. If you wish to use the support for these filters, you may
  91.  need to edit the bsd-if file to add the directories where the translators
  92.  are stored to the PATH, or to change the names of the filters if yours
  93.  are different.  The bsd-if script is supplied with an example setup
  94.  using Transcript (a commercial package from Adobe), and PBMPLUS, a PD
  95.  package by Jeff Poskanzer and others.
  96.  
  97.  
  98. EDITING THE PRINTER PORT AND TYPE
  99.  
  100.   You can set the port your printer is on and its type (parallel or printer).
  101.   If you want to use remote printers, you'll have to modifiy the printcap
  102.   insert file yourself.
  103.  
  104.  
  105. MODIFIYING THE PRINTCAP.INSERT:
  106.  
  107.  Running the lprsetup.sh script generates a file called printcap.insert, which
  108.  has a template setup for your printer queues. It cannot guarantee to do the
  109.  whole job, and you will probably need to consult your system documentation
  110.  and edit this file before you add it to your printcap file. The file has
  111.  good defaults for serial printers, as these most often cause problems in 
  112.  getting binary data to the printer. The setup is not guaranteed to be
  113.  correct, but it works on my system! You may well need to change the baud
  114.  rate, or the hardware/software handshaking used. Only a small change is
  115.  required to edit the printcap to use a networked remote printer instead of
  116.  a direct printer, and an example is given in the printcap.insert file.
  117.  
  118.  
  119. SINGLE OR DUAL QUEUES:
  120.  
  121.  If you wish to provide a postscript-only queue (eg. so that all pages
  122.  printed go through the accounting!), and the printer port is local to the
  123.  host machine, a single queue is appropriate - Ghostscript simply converts
  124.  the postscript into the printer's native data format and sends it to the
  125.  port. If the printer is on a remote networked machine (another workstation,
  126.  or a PC), or if you need to send raw printer data to the printer, you will
  127.  need to use two queues. Simply specify the '.dq' option above.
  128.  
  129.  
  130. BUGS:
  131.  
  132.  You will need write access to the ghostscript installation directory (eg.
  133.  /usr/local/share/ghostscript) in order for lprsetup.sh to create the filt
  134.  directory and soft links.
  135.  
  136.  You must list all instances of a device (if you have multiple bits-per-
  137.  pixel for the same device) as adjacent items in the device list - if you
  138.  do not, the printcap.insert will contain multiple entries for the same
  139.  device.
  140.  
  141.  Multiple instances of the same device are not supported at present.
  142.